window.Storage = {
    GameMessageType:{
        "coin":"1",
        "buy_car_level":"2",
        "buy_coin":"3",
        "cars_own": "4",
        "task": "5",
        "pklevel":"6"
    },
    Set_storage(Type, req) {
        if (cc.sys.os === cc.sys.WECHAT_GAME) {
            wx.setStorageSync(Type,req);
        } else {
            cc.sys.localStorage.setItem(Type,req);
        }
    },
    Get_storage (Type){
        let rsp = 0;
        if (cc.sys.os === cc.sys.WECHAT_GAME) {
            rsp = wx.getStorageSync(Type);
        }else{
            rsp = cc.sys.localStorage.getItem(Type);
        }
        if(!rsp){
            rsp = 0;
        }
        return rsp;
    },
}
//wx.getOpenDataContext().postMessage({
//     message: Level_Pass_Now
// });